//
//  ActivityTableViewCell.m
//  MySport
//
//  Created by lanou3g on 16/3/1.
//  Copyright © 2016年 ccsobj. All rights reserved.
//

#import "ActivityTableViewCell.h"
#import "Masonry.h"
@implementation ActivityTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self addviews];
    }return self;
}
-(void)addviews{
    
    //底视图
    //图片
    self.image = [[UIImageView alloc] init];
    self.image.backgroundColor = [UIColor orangeColor];
    [self.contentView addSubview:self.image];
    [self.image mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView).width.insets(UIEdgeInsetsMake(0,0,0,0));
    }];
    //标题
    self.headName = [[UILabel alloc] init];
    self.headName.backgroundColor = [UIColor cyanColor];
    [self.contentView addSubview:self.headName];
    [self.headName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView).width.insets(UIEdgeInsetsMake(120,10,50,100));
    }];
    //固定参加人数
    self.participation = [[UILabel alloc] init];
    self.participation.backgroundColor = [UIColor cyanColor];
    self.participation.text = @"参加人数:";
    self.participation.font = [UIFont systemFontOfSize:15.0];
    [self.contentView addSubview:self.participation];
    [self.participation mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView).width.insets(UIEdgeInsetsMake(155,290,20,55));
    }];
    //活动
    self.activity = [[UILabel alloc] init];
    self.activity.text = @"活动";
    self.activity.backgroundColor = [UIColor blueColor];
    [self.contentView addSubview:self.activity];
    [self.activity mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView).width.insets(UIEdgeInsetsMake(30,350,140,20));
    }];
    //开始时间
    self.time = [[UILabel alloc] init];
    self.time.text = @"距离活动开始时间:";
    self.time.backgroundColor = [UIColor blackColor];
    [self.contentView addSubview:self.time];
    [self.time mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView).width.insets(UIEdgeInsetsMake(155,10,20,180));
    }];
    //参加人数
    self.number = [[UILabel alloc] init];
    self.number.backgroundColor = [UIColor brownColor];
    [self.contentView addSubview:self.number];
    [self.number mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView).width.insets(UIEdgeInsetsMake(155,360,20,0));
    }];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
